
var SingleEventTarget = function () {
    this.eventTarget = new cc.EventTarget();
};
var pro = SingleEventTarget.prototype;
pro.on = function( type, callback, target, useCapture) {
    this.eventTarget.on(type, callback, target, useCapture);
};
pro.off = function (type, callback, target, useCapture) {
    this.eventTarget.off(type, callback, target, useCapture);
};
pro.dispatchEvent = function(event){
    this.eventTarget.dispatchEvent(event);
};
pro.dispatchCustomEvent = function(eventName, optionalUserData){
    var ev = new cc.Event.EventCustom(eventName);
    ev.setUserData(optionalUserData);
    this.dispatchEvent(ev);
};
pro.emit  = function(message, detail){
    this.eventTarget.emit(message, detail);
};

module.exports = new SingleEventTarget();



